package admin_user_api

import (
	"blog_go/models/res"
	"blog_go/utils"
	"github.com/gin-gonic/gin"
)

func (AdminUserApi) UserLogout(c *gin.Context) {
	_claims, _ := c.Get(utils.Claims)
	claims := _claims.(*utils.CustomClaims)
	Token := c.Request.Header.Get(utils.Token)
	utils.LogoutToken(Token, claims)
	res.OkWithMessage("成功", c)
}
